package com.kingint.mbg.ser.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kingint.mbg.dto.BackQueryParam;
import com.kingint.mbg.dto.servcieOrder.OrderQueryParam;
import com.kingint.mbg.dto.servcieOrder.SerServiceOrderParam;
import com.kingint.mbg.ser.entity.SerServiceOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 服务工单表 Mapper 接口
 * </p>
 *
 * @author wxh
 * @since 2020-12-28
 */
public interface SerServiceOrderMapper extends BaseMapper<SerServiceOrder> {

    /**
     * 根据酒店id,用户id查询对应的订单的状态
     * @param hotelId
     * @param userId
     * @param orderStatus
     * @return
     */
    List<SerServiceOrder> getAllServiceOrderList(@Param("hotelId") Integer hotelId,@Param("userId") Long userId, @Param("orderStatus") Integer orderStatus);

    /**
     * 分页查询服务工单信息
     * @param page
     * @param queryParam
     * @return
     */
    IPage<SerServiceOrderParam> getServiceOrderList(IPage<SerServiceOrderParam> page, @Param("query") BackQueryParam queryParam);

    /**
     * 查询服务单的详情信息
     * @param id
     * @return
     */
    SerServiceOrderParam getServiceInfoById(@Param("id") Integer id);

}
